var orderTableAftersale=null;
/**
 * 页面初始化
 */
$(function () {
    
});

function showAftersaleTab(){
      //售后信息
      if (orderTableAftersale==null){
          orderTableAftersale = $('#orderTableAftersale').DataTable({
              "autoWidth": false,
              "processing": true,
              "serverSide": true,
              // "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
              "dom": '<"bottom"rtflp>',
              "searching": false,
              // "pagingType": "full_numbers",
              "paging": false,
              "deferRender": true,
              "ordering": false,
              "ajax": {
                  "url": "/order/getOrderAftersaleInfo.action?orderId="+$('#myid', window.parent.document).val()
                  },
              "columns": [
                  {"data": "operStus","orderable": false},
                  {"data": "orderStatus","orderable": false},
                  {"data": "orderCode","orderable": false},
                  {"data": "isCancel","orderable": false},
                  {"data": "createTime","orderable": false}
                  ],
                  "order": [[0, "asc"],[4, "asc"]]
          });
          
       // 文字过长截断显示悬浮框
          $("#orderTableAftersale").tooltip({
              selector: ".tooltip-column-detail-5",
              container: "body",
              title: function() {
                  if ($(this)[0].scrollWidth > $(this).outerWidth()) {
                      return $(this).text();
                  }
              }
          });
      } else {
          orderTableAftersale.draw();
      }
}
